<?php
	require_once('./application/models/activiteitenModel.php');
	class item_activiteiten extends item_abstract
	{
		protected $myModel;
		protected function init()
		{	
		
			
			$this -> information['act_beschrijving'] = '';
			$this -> information['act_date'] = '';
			$this -> myModel = activiteitenModel::getInstance($this -> Db);	
		}	
		public function insert()
		{
				$dt=split('/',$this -> act_date);
				$this -> act_date = $dt[2] . '-' . $dt[1] . '-' . $dt[0];
				$this -> myModel -> addActiviteit($this);
			
		}
		public function update()
		{
			$this -> myModel -> updactiviteit ($this);
		}
		
		public function fill()
		{
			$this -> myModel -> getActiviId($this);
		}
		private function convertDate()
		{
			preg_match("/^(\d{1,2})-(\d{1,2})-(\d{4})$/", $this -> act_date, $dt);

			$this -> act_date = date("Y-m-d", mktime($dt[1], $dt[2], $dt[3]));
		}
	}

?>